﻿<?php
		session_start();
		include_once('../config.php');
		include_once("../database/DataBase.php");
		include_once("function.php");

		$email = $_POST["email"];
		$old_email = $_POST["old_email"];
		$login_id = $_POST["login_id"];
		
		$database = New DataBase();
		$database->open_connection();
		
		if($email != $old_email){
			$result = $database->checkUserByEmail($email);
			if($result){
				echo "true";
			}
			else{
				echo "Email exists.";
			}
		}
		else{
			echo "true";
		}
		$database->close_connection();
?>